/**
 * @Title: SysResource.java 
 * @Description: TODO
 * @author <a href="mailto:psammead@126.com">Psammead</a>
 * @date 2011-7-14 下午08:16:14 
 * @version 1.0
 * Copyright 2011 by Psammead
 */
package com.psammead.dms.system.sercurity.entity;

import java.io.Serializable;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.psammead.dms.common.core.bo.AbstractBaseBO;

/**
 * 系统资源实体
 * @ClassName: SysResource
 * @Description: TODO
 * @author <a href="mailto:psammead@126.com">psammead</a>
 * @version 1.0
 * @date 2011-7-14
 */
@Entity(name="SysResourceType")
@Table(name="tb_sys_res_type")
public class SysResourceType extends AbstractBaseBO implements Serializable {

	/**
	 * @Fields serialVersionUID : TODO
	 */
	private static final long serialVersionUID = 6009107117066868152L;
	
	private long id;
	private String name;
	private Set<SysResource> resources;

	@Override
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name="res_type_id")
	public long getId() {
		// TODO Auto-generated method stub
		return this.id;
	}
	public void setId(long id) {
		this.id = id;
	}
	
	@Column(name="res_type_name")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@OneToMany(mappedBy="type")
	public Set<SysResource> getResources() {
		return resources;
	}
	public void setResources(Set<SysResource> resources) {
		this.resources = resources;
	}



	
}
